// dlg.txt

//MK Edit

//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 21;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "You approach the Achaemin Gate, the fortification guarding the road into the Rokaj. This looks like Haven construction. It's here to make sure your Empire can keep track of who goes where with what and that customs are properly charged.";
	text2 = "There are a hundred miles of wilderness to the west. It's a good place for young Ro to try to make settlements and practice raiding. Haven makes sure to keep these traditional activities limited.";
	text2 = "Alas, the tower is poorly tended to. Piles of junk are everywhere. There are no proper soldiers. Instead, you see a band of dirty, drunken warriors sitting around a fire. They're not soldiers of Haven. Another sign of pitiful neglect.";
	code =
		sf(this_town,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "There is an old wooden fortification here, placed to defend the outpost from thieves and ka-wolves and whatever other miscreants wander in from the wilds. The gateway has been boarded up. The boards get removed when someone pays enough to pass through.";
	text2 = "You could force your way through, but there's no reason. All of your tasks are to the east. You turn back.";
	code =
		sf(this_town,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0;
	text1 = "This was a storage warehouse, back when this outpost was properly run. Now there is trash everywhere. The air reeks of rot. You hear bubbling and an odd clicking in the darkness ahead.";
	code =
		sf(this_town,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "The inside of the tower is neglected, dirty, and smelly. Not a surprise. Long corridors stretch off into shadowy, dank chambers. You can barely hear muttering and snarling in the distance, but you aren't sure from what direction.";
	text2 = "There are definitely brigands in here, and they're unlikely to be as agreeable as the ones outside.";
	code =
		sf(this_town,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "Suddenly, doors fly open in front of and behind you. A bunch of rogues have been lurking in wait, ready to ambush you. Now the ambushing is happening. There's no chance of a peaceful resolution now.";
	code =
		sf(this_town,5,1);
		
		give_object_message(91,103);
		give_object_message(92,103);
		give_object_message(93,103);
		give_object_message(94,103);
		give_object_message(95,103);
		give_object_message(96,103);
		give_object_message(97,103);
		give_object_message(98,103);
		
		activate_hidden_group(7);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "__";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "The rogue Havenite Zemri falls to the ground, dead. He has paid for his crimes. It remains unclear what will happen to those who let him ignore your laws.";
	text2 = "He has a key on a chain around his neck. You take it.";
	code =
		set_dialogue_pic(842);
	break;

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

//// Pillar Lora

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "One of the scruffy warriors guarding the road stands to greet you. She isn't a soldier of Haven. She is a Low Dhagan, with dirty armor and a crude spear. She is also drunk.";
	text2 = "She barely takes the time to inspect you before she stumbles forward and slurs, _Travelers? You know the routine. I'm Pillar Lora. You'll show me your goods. We'll decide what we want to let you pass._";
	text3 = "This is a Havenite border station. To be treated this way is completely irregular. And illegal.";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "_You are from the Low Dhaga?_";
	text1 = "_You guessed right. The Kranas is mad and wild and they feed their people to trees. Still, we can make a living here._ She belches deeply.";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_What are you doing here? This is a Havenite outpost._";
	text1 = "She laughs. You can smell the sour Ro booze on her breath. _This is where I could get work. Look at me. If I didn't leave the Low Dhaga, I'd just be stuck away in a closet forever._";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_And how much does it cost to pass?_";
	text1 = "She looks confused. _Don't you know where you are? We decide what you pay. We can't know what we want until you show us what you have!_ Her fellow thugs chuckle. None of them is sober enough to take a close, analytical look at you.";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_I will pay nothing._";
	text1 = "_Then you won't pass. You can just turn around on your precious little toes and head back the way you came. We're warriors of the Ro!_ None of them is sober enough to take a close, analytical look at you.";
	text2 = "";

begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_Who is your boss?_";
	text1 = "_Our boss is Zemri! He is a Havenite! You know what that means? Means you better do what we say!_";
	text2 = "Something occurs to one of the brigands. She walks up and pulls on Pillar Lora's sleeve. She tries to look closely at you. _Wait. Who are you?_";

begintalknode;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "_Look closer._";
	text1 = "She finally focuses on your insignia. Thoughts maneuver slowly through her head, bumping into things. _Wait. You ... You are the ... The big visitor. From Haven? Oh. That might change things._";

begintalknode;
	state = 13;
	nextstate = 14;
	condition = 1;
	question = "_Why are you taking tolls?_";
	text1 = "_It's our right. Haven says so. We can take what we want. That's the rule now._ Seems unlikely. _Zemri ... I think Zemri would want us to let you go. So. You can go._";

begintalknode;
	state = 13;
	nextstate = 14;
	condition = 1;
	question = "_I need to meet your boss._";
	text1 = "_Oh. Well, Zemri ... Zemri doesn't like guests. He doesn't handle unpredictable people well. You should stay out of our hall. I think Zemri would want us to let you go. So. You can go._";

begintalknode;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "_You made a fatal error threatening me._ Attack.";
	text1 = "They're drunk and slovenly, but they're still Ro. Retreat is not really an option. They immediately decide that you are easy prey and attack. _They'll never find your body!_";
	action = END_TALK;
	code =
		violence(2);
		sf(21,12,1);
		set_attitude(30001,10);
	break;
	
begintalknode;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "_You need to leave. Right now._";
	text1 = "For a moment, they are insulted by the suggestion. Then it dawns on them who they are actually dealing with. Lora says, _We're not fleeing, mind you. We've just decided to find new employment._ They pack up everything close to hand and leave very quickly.";
	action = END_TALK;
	code =
		violence(-2);
		sf(21,12,1);
		erase_char(30001);
		kill_object(83,1);
	break;
	
begintalknode;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "_I am leaving._";
	text1 = "They're drunk and slovenly, but they're still Ro. They mistake your decision to depart as a sign of weakness. They immediately decide that you are easy prey and attack. _They'll never find your body!_";
	action = END_TALK;
	code =
		violence(-2);
		sf(21,12,1);
		set_attitude(30001,10);
	break;

begintalknode;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "_Stand aside. I am going inside to speak with your master._";
	text1 = "Now they look scared. _Zemri wouldn't like that! He'll be real mad at us! And ... This is getting too hot for us. We're going ... for a walk. Not fleeing. Just strolling._ The Low Dhagans pack up everything with arm's reach and depart to the east very quickly.";
	action = END_TALK;
	code =
		sf(21,12,1);
		erase_char(30001);
		kill_object(83,1);
	break;

	
// Zemri

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "At last, you meet the leader of the brigands and thugs in this tower. He is no Ro. He is Havenite. Dirty and drunk, yes, but still from your homeland. You wait eagerly to see how he will respond to royalty.";
	text2 = "You find that he is belligerent and a bit mad. He sneers, _How dare you! We had a deal! I did what I was told. I paid well! Zemri knows how to keep his word. And you break in and stab my people. I say again, how dare you!_";
	code =
		set_dialogue_pic(842);
	break;
	
begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "_Do you realize who you are talking to?_";
	text1 = "_I do. You're [N], Queen Sharyn's drunken, useless [P]. Come here to shake me down, no doubt. Don't you realize I have a license to be here?_";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "_Sorry. I didn't mean to cause trouble._";
	text1 = "_You didn't mean trouble,_ he hoots. _Coming in here and stabbing everyone within reach. I thought Haven knew how to honor deals. We pay well for our license, and we never cheated you out of a single coin!_";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "_Humor me. What am I doing wrong?_";
	text1 = "_You aren't living up to the terms of our deal! Coming in here and stabbing everyone within reach. I thought Haven knew how to honor deals. We pay well for our license. We never cheated you out of a single coin! And still, you make this mess!_";

begintalknode;
	state = 41;
	nextstate = 42;
	condition = 1;
	question = "_Sorry. You have a 'license'?_";
	text1 = "_Well, it's not on paper. Handshake agreement. We free up Haven's soldiers from having to administer this lowly tower. We collect the tariffs we think are fair. We pay a percentage upstairs. You don't have to spend your soldiers on it. A good deal for everyone!_";

begintalknode;
	state = 42;
	nextstate = 43;
	condition = 1;
	question = "_And who did you get this license from?_";
	text1 = "_Governor Yvette! Don't you look after your own people? She made the deal with us, and she's pocketed a pretty penny from our work, thank you. A good deal, and now you've ruined everything._";

begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "_Well, I suppose you can stay here._";
	text1 = "_Now? After what you've done? Scaring off or impaling my best fighters? The whole deal is a mess now. I hope you feel sorry!_";

begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "_What have you been doing to people who passed through?_";
	text1 = "_Nothing Haven wouldn't do. Stop them. Search them. Take a share. Let them by. I mean, we're a little more ... irregular about it. Maybe we take more than normal. They're all vassals, though, so who cares?_";

begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "_Has nobody fought you before now?_";
	text1 = "_Sometimes we get a hothead. The Ro, you know. When I poke my head out and they see a Havenite is here, they give in. They know what Haven will do if they harm a hair on my head._";

begintalknode;
	state = 43;
	nextstate = 44;
	condition = 1;
	question = "_What is to be done with you?_";
	text1 = "_Well, I'll tell you. I am packing up my wealth, and I am leaving. I've made plenty here. I'll buy a nice plot of land back home. Maybe a government post. Things are getting too scary and warlike around here anyway. So just stand back and soon I'll be gone._";
	
begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "_Perhaps you can stay here, but you will bribe me instead._";
	text1 = "Zemri shakes his head. _Tempting, but no. I've lost too much strength, and the Ro is too close to rebellion. Time to take my winnings off the table._";

begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "_Take your ill-gotten gains and go._";
	text1 = "_I thought that's what you'd say._ He is true to their word. Zemri is no fool. He was already prepared to go with a moment's notice.";
	text2 = "Soon he is gone, heavy sacks of coin hanging from his belt. His remaining warriors go with him. The gate has been retaken.";
	action = END_TALK;
	code =
		sf(21,11,2);
		clear_town(21);
		erase_char(30012);
	break;
	
begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "_You can go, but you will leave all of your treasure._";
	text1 = "This would be a great time for him to submit. He does not. Zemri sneers, _What? You'd have me give up years of work? My entire future? No. Not a chance!_";

begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "_You can go, but you will leave half of your treasure._";
	text1 = "Zemri really doesn't like this suggestion. It's too reasonable. He really doesn't want to die here, though. _Well, you're stealing my future. I'm sure you know that. But ... Half of a lot is not the whole lot. It's a deal._ He takes a key from around his neck and tosses it to you.";
	text2 = "Zemri is no fool. He was already prepared to go with a moment's notice. Soon he is gone, a heavy sack of coin hanging from his belt. His remaining warriors go with him. The gate has been retaken.";
	action = END_TALK;
	code =
		sf(21,11,2);
		clear_town(21);
		set_spec_item(2,1);
		erase_char(30012);
	break;


begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "_You have violated the laws of Haven, and you will pay for it._ Attack.";
	text1 = "Zemri is shocked. He can't understand how everything fell apart so quickly and so completely. He attempts to surrender, but it's too late. As you lunge at him, blade drawn, he defends himself. His final words: _It's not fair!_";
	action = END_TALK;
	code =
		set_attitude(30012,10);
	break;

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				